#!/bin/bash

echo "This scripts checks the Grades.jar file for bugs"

echo "Test Case 1: Input: 30, 40"
echo "Testing"
tc1=`java -jar /home/sqa/ittqa2b05/Grades.jar 30 40`

echo "Test Case 2: Input: 40, 50"
echo "Testing"
tc2=`java -jar /home/sqa/ittqa2b05/Grades.jar 40 50`

echo "Test Case 3: Input: 50, 70"
echo "Testing"
tc3=`java -jar /home/sqa/ittqa2b05/Grades.jar 50 70`

echo "Test Case 4: Input: 80, 90"
echo "Testing"
tc4=`java -jar /home/sqa/ittqa2b05/Grades.jar 80 90`

echo "Test Case 5: Input: 100, 100"
echo "Testing"
tc5=`java -jar /home/sqa/ittqa2b05/Grades.jar 100 100`


#Test Case 1
if [ "$tc1" = "Component Fail" ]
	then
	echo "Component Fail"
elif [ "$tc1" = "Fail" ]
	then
	echo "Fail"
elif [ "$tc1" = "Pass" ]
	then
	echo "Pass"
elif [ "$tc1" = "Pass with distinction" ]
	then
	echo "Pass with distinction"
fi


#Test Case 2
if [ "$tc2" = "Component Fail" ]
	then
	echo "Component Fail"
elif [ "$tc2" = "Fail" ]
	then
	echo "Fail"
elif [ "$tc2" = "Pass" ]
	then
	echo "Pass"
elif [ "$tc2" = "Pass with distinction" ]
	then
	echo "Pass with distinction"
fi


#Test Case 3
if [ "$tc3" = "Component Fail" ]
	then
	echo "Component Fail"
elif [ "$tc3" = "Fail" ]
	then
	echo "Fail"
elif [ "$tc3" = "Pass" ]
	then
	echo "Pass"
elif [ "$tc3" = "Pass with distinction" ]
	then
	echo "Pass with distinction"
fi


#Test Case 4
if [ "$tc4" = "Component Fail" ]
	then
	echo "Component Fail"
elif [ "$tc4" = "Fail" ]
	then
	echo "Fail"
elif [ "$tc4" = "Pass" ]
	then
	echo "Pass"
elif [ "$tc4" = "Pass with distinction" ]
	then
	echo "Pass with distinction"
fi


#Test Case 5
if [ "$tc5" = "Component Fail" ]
	then
	echo "Component Fail"
elif [ "$tc5" = "Fail" ]
	then
	echo "Fail"
elif [ "$tc5" = "Pass" ]
	then
	echo "Pass"
elif [ "$tc5" = "Pass with distinction" ]
	then
	echo "Pass with distinction"
fi
